package demo.demo02;

import java.util.Scanner;

public class test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("我的年薪计算器小算法\n Exit退出程序；next计算下一个年薪。");
        while (true) {
            System.out.println("请输入月薪：");
            int MonthSalary = scanner.nextInt();
            System.out.println("请输入一年多少个月薪资：");
            int Months = scanner.nextInt();
            int YearSalary = MonthSalary * Months;
            if (YearSalary > 10 && YearSalary < 20) {
                System.out.println("恭喜你超过了90%的国人!");
            } else if (YearSalary > 20) {
                System.out.println("恭喜你超过了98%的国人！");
            }
            System.out.println("年薪是：" + YearSalary);
            System.out.println("请输入命令（Exit退出程序；next计算下一个年薪。其他任意字符表示继续计算）");
            scanner.nextLine();
            String cmd = scanner.nextLine();
            System.out.println(cmd);

            if ("Exit".equals(cmd)) {
                System.out.println("推出程序");
                break;
            } else if ("Next".equals(cmd)) {
                System.out.println("请重新输入.....");
                continue;
            }
        }
        System.out.println("=====================");
        int count = 0;
        for (int h = 0; h < 24; h++) {
            for (int min = 0; min < 60; min++) {
                for (int s = 0; s < 60; s++) {
                    count++;//打印多少次
                    System.out.println(h + "点" + min + "分" + s + "秒");
                }
            }
        }
        System.out.println("24点 0分 0秒");
        System.out.println("一共打印：" + count + 1 + "次！");

        System.out.println("=====================");
        for (int a = 1; a <= 5; a++) {
            System.out.println(a + "天");
        }
        System.out.println("===============");
        int b = 1;
        while (b <= 5) {
            System.out.println(b + "天");
            b++;
        }
        System.out.println("===============");
        int sum = 1;
        do {
            System.out.println(sum + "天");
            sum++;
        } while (sum <= 5);
        System.out.println("===============");


        char letter = 'A';
        int i;
        for (i = 0; i < 26; i++) {
            char letter1 = (char) (letter + i);
            System.out.print(letter1 + "\t");
            if (i % 5 == 4) {
                System.out.println();
            }
        }
        System.out.println("\n" + "打印了" + i + "次");
    }
}
